package com.skd.ssm.web.controls;

import java.util.List;

import com.skd.ssm.domain.User;
import com.skd.ssm.service.UserService;
import org.apache.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import com.opensymphony.xwork2.ModelDriven;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

@Controller("userAction")
@Scope("prototype")
public class UserAction implements
        ModelDriven<User> {

    private User user=new User();
    @Autowired
    public UserService userService;

    public String select(){

        user = userService.selectByPrimaryKey(1);
        return "success";

    }

    public User getModel() {
        return user;
    }
}
